{template 'web/common/common'}
{template 'web/article/navbar'}
<link rel="stylesheet" type="text/css" href="../addons/{php echo $_GPC['m']}/resource/swal/dist/sweetalert2.min.css" />
<link rel="stylesheet" type="text/css" href="../addons/kundian_farm/resource/css/layui.css" />
<link rel="stylesheet" type="text/css" href="../addons/kundian_farm/resource/css/new-common.css" />
<blockquote class="layui-elem-quote">
  资讯新增/编辑
</blockquote> 

<form class="layui-form" action="{url 'site/entry/article',array('m'=>'kundian_farm','op'=>'article_list_save','version_id'=>$_GPC['version_id'],'cate_id'=>15)}" method="post">
	 <div class="layui-form-item">
	    <label class="layui-form-label">资讯标题</label>
	    <div class="layui-input-block">
	      <input type="text" name="title" value="{$list['title']}"  placeholder="资讯标题" class="layui-input">
	    </div>
	  </div>

	  <div class="layui-form-item">
	    <label class="layui-form-label">资讯分类</label>
	    <div class="layui-input-block">
	      <select name="type_id" lay-filter="aihao">
	        <option value="">全部</option>
	        {loop $typeData $index $item}
	        	<option value="{$item['id']}" <?php if($item['id']==$list['type_id']){echo 'selected';} ?> >{$item['type_name']}</option>
	        {/loop}
	      </select>
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">封面(360*200)</label>
	    <div class="layui-input-block" style="width: 63%;">
	      {php echo tpl_form_field_image('cover',$list['cover']);}
	    </div>
	  </div>

	  <div class="layui-form-item">
	    <label class="layui-form-label">虚拟浏览量</label>
	    <div class="layui-input-block">
	      <input type="number" name="view_count"  value="{$list['view_count']}" class="layui-input">
	    </div>
	 </div>
	 
	 <div class="layui-form-item">
	    <label class="layui-form-label">内容</label>
	    <div class="layui-input-block" style="width: 23%">
	      {php echo tpl_ueditor('content',$list['content']);}
	    </div>
	 </div>

	 <div class="layui-form-item">
	    <label class="layui-form-label">排序</label>
	    <div class="layui-input-block">
	      <input type="number" name="rank"  value="{$list['rank']}" class="layui-input">
	    </div>
	 </div>


	<div class="layui-form-item">
	    <div class="layui-input-block">
	    	<input type="hidden" name="id" value="{$list['id']}">
	      <button class="layui-btn" lay-submit="" lay-filter="demo1">保存</button>
	    </div>
	</div>

</form>  

<script src="../addons/kundian_farm/resource/layui.js" charset="utf-8"></script>
<script>
layui.use(['form', 'layedit', 'laydate'], function(){

});
</script>
